package com.cxyd.common.utils;

import java.io.Serializable;

public class MonitorResult<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    private String code = "0";
    private String message = "success";
    private String reqCode = "0";
    private T data;

    public MonitorResult<T> ok(String reqCode, T data) {
        this.setReqCode(reqCode);
        this.setData(data);
        return this;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return message;
    }

    public void setMsg(String message) {
        this.message = message;
    }

    public String getReqCode() {
        return reqCode;
    }

    public void setReqCode(String reqCode) {
        this.reqCode = reqCode;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "{" +
                "code='" + code + '\'' +
                ", message='" + message + '\'' +
                ", reqCode='" + reqCode + '\'' +
                ", data=" + data +
                '}';
    }
}
